
import { EditorState } from "prosemirror-state";
import { history } from "prosemirror-history";


export function clearEditorHistory(view:any) {
 console.log("view",view)
  const newState = EditorState.create({
    doc: view.state.doc, // 保留当前文档内容
    schema: view.state.schema,
    plugins: [
      history(), // 重新创建一个空的 history 插件
    ]
  });
  view.updateState(newState);
}
